Skip to content

Conversation

@mxschll
Copy link
Member

@mxschll mxschll commented Nov 4, 2025

Description

Custom padding-inline values on inputs can cause text to overlap with icons:

image

This solution:

  • Parses paddingInline values (including shorthand notation like '30px 10px') into separate start/end values
  • Uses CSS max() to compare custom padding vs required icon padding
  • Applies whichever is larger, preventing text overlap while respecting custom padding

How has this been tested?

  • Verified with screenshot tests - no regressions
  • Added unit tests for padding parsing and style generation
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.25%. Comparing base (58547d1) to head (db6d4bc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4011   +/-   ##
=======================================
  Coverage   97.25%   97.25%           
=======================================
  Files         859      859           
  Lines       25394    25405   +11     
  Branches     9047     9053    +6     
=======================================
+ Hits        24697    24708   +11     
+ Misses        691      650   -41     
- Partials        6       47   +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mxschll mxschll changed the title fix: prevent icon-text overlap with custom padding proof of concept: prevent icon-text overlap with custom padding Nov 10, 2025
@mxschll mxschll changed the title proof of concept: prevent icon-text overlap with custom padding poc: prevent icon-text overlap with custom padding Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant